import Router from 'koa-router';
import proxyService from '../../common/proxyService';
import {
  getSeatListMP,
  getInteractiveStatisticsMP,
  getConvMessageListByConvIdMP,
  getTempGroupMP, // 获取模板消息分组
  getTempMsgMP, // 获取模板消息
} from '../../api';

const router = new Router();

// 获取默认免费信息
router.post('/getSeatList', async ctx => {
  const response = await proxyService.postProxy(ctx, getSeatListMP);
  return (ctx.body = response);
});

router.post('/getInteractiveStatistics', async ctx => {
  const response = await proxyService.postProxy(ctx, getInteractiveStatisticsMP);
  return (ctx.body = response);
});

router.post('/getConvMessageListByConvId', async ctx => {
  const response = await proxyService.postProxy(ctx, getConvMessageListByConvIdMP);
  return (ctx.body = response);
});

router.post('/getTempGroup', async ctx => {
  const response = await proxyService.postProxy(ctx, getTempGroupMP);
  return (ctx.body = response);
});

router.post('/getTempMsg', async ctx => {
  const response = await proxyService.postProxy(ctx, getTempMsgMP);
  return (ctx.body = response);
});

export default router;
